<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%awards}}".
 *
 * @property int $id
 * @property string $name_awards 奖项名
 * @property string $name 奖品名
 * @property string $img_name 奖品图片
 * @property int $num 奖项数
 * @property int $probability 中间概率
 * @property int $created_at 创建时间
 */
class Awards extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%awards}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['name_awards', 'name', 'img_name', 'num', 'probability'], 'required'],
            [['num', 'probability', 'created_at'], 'integer'],
            [['name_awards', 'name', 'img_name'], 'string', 'max' => 32],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name_awards' => 'Name Awards',
            'name' => 'Name',
            'img_name' => 'Img Name',
            'num' => 'Num',
            'probability' => 'Probability',
            'created_at' => 'Created At',
        ];
    }
}
